package VN.EDU.IMIC.DEVELOPER.TRANTHITHANHNGA.ARRAY.EX10;

public class Models {

	public int[] arrMark(String[][] answer, String[] key) {
		int[] arrMark = new int[answer.length];
		int k = 0;
		for (int i = 0; i < answer.length; i++) {
			int sum = 0;
			for (int j = 0; j < answer[i].length; j++) {
				for (int m = 0; m < key.length; m++) {
					if (answer[i][j] == key[m] && m == j) {
						sum++;
					}
				}
				arrMark[k] = sum;
			}
			k++;
		}

		return arrMark;
	}
}
